/*
 * ethernet.h
 *
 * Created: 12/22/2011 11:50:27 AM
 *  Author: Administrator
 */ 

#include "wiznet.h"

#ifndef ETHERNET_H_
#define ETHERNET_H_

#define MAX_BUF 512
uint8_t buf[MAX_BUF];

/*
	Gets the status of socket with id socket_id (0-3).
*/
uint8_t get_socket0_status(void);

uint8_t socket(uint8_t eth_protocol,uint16_t tcp_port);

void close(void);

void disconnect(void);

uint8_t listen(void);

uint16_t send(const uint8_t *buf,uint16_t buflen);

uint16_t recv(uint8_t *buf,uint16_t buflen);

uint16_t recv_size(void);

#endif /* ETHERNET_H_ */